package com.study.langchain4j.api.tools;

import com.study.langchain4j.service.tools.ToolHighLevelService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xl-9527
 * @since 2025/11/2
 **/
@RestController
@RequestMapping("ai/tools/high-level")
public class ToolHighLevelApi {

    private final ToolHighLevelService.ToolHighLevelAiService toolHighLevelAiService;

    public ToolHighLevelApi(final ToolHighLevelService.ToolHighLevelAiService toolHighLevelAiService) {
        this.toolHighLevelAiService = toolHighLevelAiService;
    }

    @RequestMapping("get-now-date")
    public String getNowDate(@RequestParam("userMessage") String userMessage) {
        return toolHighLevelAiService.getNowDate(userMessage);
    }
}
